using System;
using System.Collections.Generic;
using System.Reflection;
using OracleInternal.Common;

namespace OracleInternal.NetStandard
{
	internal class NetStandardConfig
	{
		internal static string ODPC_ONSConfig_ConfigFile;

		internal static string ODPC_ONSConfig_Mode;

		internal static string[] NetCoreConfigParameters;

		static NetStandardConfig()
		{
			ODPC_ONSConfig_ConfigFile = "onsConfig." + ConfigInfo.ONSConfigFile;
			ODPC_ONSConfig_Mode = "onsConfig." + ConfigInfo.ONSMode;
			List<string> list = new List<string>();
			FieldInfo[] fields = typeof(ConfigBaseClass).GetFields(BindingFlags.Static | BindingFlags.NonPublic);
			for (int i = 0; i < fields.Length; i++)
			{
				ConfigurationAttribute configurationAttribute = Attribute.GetCustomAttribute(fields[i], typeof(ConfigurationAttribute)) as ConfigurationAttribute;
				if (configurationAttribute != null && string.Compare("TNS_ADMIN", configurationAttribute.ConfigEntry, ignoreCase: true) != 0 && string.Compare("LDAP_ADMIN", configurationAttribute.ConfigEntry, ignoreCase: true) != 0)
				{
					list.Add(configurationAttribute.ConfigEntry);
				}
			}
			NetCoreConfigParameters = list.ToArray();
		}
	}
}
